package com.jason.imagesnode.util;

import com.alibaba.fastjson.JSON;
import com.jason.imagesnode.MatrixToImage4TextWriter;
import com.jason.imagesnode.WriteQrCode;

import java.awt.image.BufferedImage;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.UUID;

public class imgCodeTest {
    //存放logo的文件夹
    static String filename = UUID.randomUUID().toString().replace("-", "");
    private static String path = "D:/qrcodeTest/" + filename + ".jpg";

    /* public static void main(String[] args) {
         //二维码内容
         String content = "我是针细杰";
         String title = "猜猜我是谁";
         String text = "提示：我很细节";
         String text2 = "第三行";
         // WriteQrCode.writeTextAndImageCode(content, title, text, text2);
         WriteQrCode.writeTextCode(content, title, text, text2);
     }*/
   /* public static void main(String[] args) {
       String test ="[{\"result\":\"Y\",\"001\":\"202009185217a809dee849dbaca5bc26f88b5fb3.jpg\",\"002\":\"20200918892c1b7460de410c8976726b97066318.jpg\",\"003\":\"20200918999db778a0164034a30f9034ba166a40.jpg\"}]";
        Object o = JSON.parseArray(test);
        List<Map<String, String>> newobjectParam = (List<Map<String, String>>) o;
        System.out.println(newobjectParam.get(0).get("filename"));
    }*/

    public static void main(String[] args) {

        String new_pro_code = "999999999999";
        String title = "渝C5G203长安福特轿车2.0（黑）";
        String new_pro_code_text = "1150020303090100000008";
        String text2 = "1150020303090100000008";
        String logoPath = "D:/qrcodeTest";
        String logoName = "psb.jpg";

        // WriteQrCode.writeTextAndImageCode(new_pro_code, title, new_pro_code_text, text2, path, logoPath, logoName);

        WriteQrCode.writeTextCode(new_pro_code, title, new_pro_code_text, text2, path);
    }

}
